#pragma once
/*--------------------------------------------------------------------------------
 * Adaptive Intelligence - Foundation Framework Class Library
 * Version 2.00
 * 
 * Managed DNS Record Class
 *      Represents the content of a DNS record returned from a DNS Query.
 *------------------------------------------------------------------------------*/

/*--------------------------------------------------------------------------------
 * System Imports
 *------------------------------------------------------------------------------*/
#include "stdafx.h"
#include "DnsAddressRecord.h"

using namespace System;
using namespace System::Net;

namespace Adaptive
{
	namespace Network
	{
		namespace Dns
		{
			/// <summary>
			/// Represents the content of a DNS record returned from a DNS Query.
			/// </summary>
			/// <remarks>
			/// This class is used in conjunction with the <b>Adaptive.Network.Dns.DnsQuery</b> static class to provide
			/// more detailed DNS information than the standard System.Net.Dns class.
			/// </remarks>
			public ref class ManagedDnsRecord
			{
			public:
				ManagedDnsRecord(void);
				ManagedDnsRecord(DNS_RECORD* recordPointer);
				~ManagedDnsRecord();

				property String^ Name { String^ get(); }
				property DnsQueryType RecordType { DnsQueryType get(); }
				property short DataLength { short get(); }
				property int	RecordFlags { int get(); }
				property int	Ttl	{int get(); }
				property int	ReservedValue {int get(); }
				property DnsAddressRecord				AddressRecord		{DnsAddressRecord get(); }
				property DnsStartOfAuthorityRecord		SoaRecord			{DnsStartOfAuthorityRecord get(); }
				property DnsPointerRecord				PointerRecord		{DnsPointerRecord get(); }
				property DnsMailInformationRecord		MailInfoRecord		{DnsMailInformationRecord get(); }
				property DnsMailExchangeRecord			MailExchangeRecord	{DnsMailExchangeRecord get(); }
				property DnsTextRecord					TextRecord			{DnsTextRecord get(); }
				property DnsNullRecord					NullRecord			{DnsNullRecord get(); }
				property DnsWellKnownServiceRecord		WksRecord			{DnsWellKnownServiceRecord get(); }
				property DnsIp6AddressRecord			Ip6Record			{DnsIp6AddressRecord get(); }
				property DnsKeyRecord					KeyRecord			{DnsKeyRecord get(); }
				property DnsSignatureRecord				SignatureRecord		{DnsSignatureRecord get(); }
				property DnsATMAddressRecord			ATMAddressRecord	{DnsATMAddressRecord get(); }
				property DnsNextRecord					NextRecord			{DnsNextRecord get(); }
				property DnsServiceRecord				SrvRecord			{DnsServiceRecord get(); }
				property DnsTKeyRecord					TKeyRecord			{DnsTKeyRecord get(); }
				property DnsTSignatureRecord			TSignatureRecord	{DnsTSignatureRecord get(); }
				property DnsWINSRecord					WinSRecord			{DnsWINSRecord get(); }
				property DnsWINSReverseLookupRecord		WinSRRecord			{DnsWINSReverseLookupRecord get(); }
				property System::Object^				DataRecord			{System::Object^ get(); }

			private:
				
				String^			_name;
				DnsQueryType	_recordType;
				short			_dataLength;
				int				_recordFlags;
				int				_ttl;
				int				_reservedValue;

				DnsAddressRecord^			_addressRecord;
				DnsStartOfAuthorityRecord^	_soaRecord;
				DnsPointerRecord^			_pointerRecord;
				DnsMailInformationRecord^	_mailInfoRecord;
				DnsMailExchangeRecord^		_mailExchangeRecord;
				DnsTextRecord^				_textRecord;
				DnsNullRecord^				_nullRecord;
				DnsWellKnownServiceRecord^	_wksRecord;
				DnsIp6AddressRecord^		_ip6Record;
				DnsKeyRecord^				_keyRecord;
				DnsSignatureRecord^			_signatureRecord;
				DnsATMAddressRecord^		_aTMAddressRecord;
				DnsNextRecord^				_nextRecord;
				DnsServiceRecord^			_srvRecord;
				DnsTKeyRecord^				_tKeyRecord;
				DnsTSignatureRecord^		_tSignatureRecord;
				DnsWINSRecord^				_winSRecord;
				DnsWINSReverseLookupRecord^	_winSRRecord;
			};
		}
	}
}